package First;

/**
 * Created by msingh on 2014-06-27.
 */

public class BaseClass {
    int x;
    int y;
    public BaseClass() {
    }
    public BaseClass(int x, int y) {
//		System.out.println( "value if x is:" + x + " and Value if y is : " + y);
//		return;
        this.x = x;
        this.y = y;
    }

    public static void method1(){
        System.out.println("I am method1 in Base class");
    }
    public void method2 (String name){
        System.out.println("I am Method 2 creted by: " + name + " in Base class:");
    }
    public static void main(String[] args){
        method1();

        BaseClass cons = new BaseClass(1,2);
        System.out.println("variable from constructor is: " + cons.x);
        System.out.println("variable from constructor is: " + cons.y);


        BaseClass calledby = new BaseClass();
        calledby.method2("Malkiat Randhawa");
    }
}
